//
//  TimingSettingModel.h
//  wAudioShare
//
//  Created by Anson on 15-2-9.
//  Copyright (c) 2015年 赵帅. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "SceneDeviceModel.h"

typedef NS_ENUM(NSInteger, TimingSettingRunType) {
    TimingSettingRunTypeFixedDay,
    TimingSettingRunTypeWeek
    
};

typedef NS_ENUM(NSInteger, TimingSettingType) {
    //!*** 设备操作 **/
    TimingSettingDeviceTypeNormal,
    //!*** Sensor Arm **/
    TimingSettingDeviceTypeSensorArm
    
};

@interface TimingSettingModel : NSObject

@property (readonly, nonatomic) TimingSettingRunType runType;
@property (assign, nonatomic) TimingSettingType type;

//!***具体日期和时间20141127T153000 **/
@property (strong, nonatomic) NSDate *date; //具体日期和时间20141127T153000

//!*** 0-6 [周日 - 周六] **/
@property (readonly, nonatomic) NSString *weeks;//0-6 [周日 - 周六]

//!*** 时间 hh:mm:ss.ms **/
//@property (readonly, nonatomic) NSString *time;//时间 hh:mm:ss.ms
//!*** 定时标识id **/
@property (copy, nonatomic) NSString *unId;
@property (strong, nonatomic) SceneDeviceModel *deviceModel;

- (instancetype)initWithFixedDateTime:(NSDate *)dateTime;
- (instancetype)initWithWeek:(NSString *)weeks andTime:(NSDate *)time;

+ (NSString *)getDescriptForWeeksVal:(NSArray *)weeks;
+ (NSString *)getDateTimeVal:(NSDate *)date;
+ (NSString *)getTimeFromISOString:(NSString *)str;
+ (NSString *)getDateFromISOString:(NSString *)str;

@end
